# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1347 -> 1.1348 # include/asm-ppc64/page.h 1.20 -> 1.21 # include/asm-ppc64/unistd.h 1.24 -> 1.25 # include/asm-ppc64/module.h 1.5 -> 1.6 # include/asm-ppc64/ucontext.h 1.4 -> 1.5 # include/asm-ppc64/sigcontext.h 1.5 -> 1.6 # include/asm-ppc64/types.h 1.4 -> 1.5 # include/asm-ppc64/proc_fs.h 1.3 -> 1.4 # include/asm-ppc64/naca.h 1.7 -> 1.8 # include/asm-ppc64/xics.h 1.6 -> 1.7 # include/asm-ppc64/mmu.h 1.8 -> 1.9 # include/asm-ppc64/ptrace.h 1.3 -> 1.4 # include/asm-ppc64/io.h 1.9 -> 1.10 # include/asm-ppc64/rtas.h 1.7 -> 1.8 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/19 davidm@tiger.hpl.hp.com 1.1348 # More ppc64 bad merge fixing... # -------------------------------------------- # diff -Nru a/include/asm-ppc64/io.h b/include/asm-ppc64/io.h --- a/include/asm-ppc64/io.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/io.h Fri Jun 27 22:14:17 2003 @@ -107,7 +107,6 @@ #define IO_SPACE_LIMIT ~(0UL) -#define MEM_SPACE_LIMIT ~(0UL) #ifdef __KERNEL__ diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h --- a/include/asm-ppc64/mmu.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/mmu.h Fri Jun 27 22:14:17 2003 @@ -221,6 +221,13 @@ #endif /* __ASSEMBLY__ */ +/* + * Location of cpu0's segment table + */ +#define STAB0_PAGE 0x9 +#define STAB0_PHYS_ADDR (STAB0_PAGE< +#include + +#ifndef __ASSEMBLY__ struct naca_struct { - void *xItVpdAreas; - void *xRamDisk; - u64 xRamDiskSize; /* In pages */ - struct paca_struct *paca; /* Ptr to an array of pacas */ - u64 debug_switch; /* Bits to control debug printing */ - u16 dCacheL1LineSize; /* Line size of L1 DCache in bytes */ - u16 dCacheL1LogLineSize; /* Log-2 of DCache line size */ - u16 dCacheL1LinesPerPage; /* DCache lines per page */ - u16 iCacheL1LineSize; /* Line size of L1 ICache in bytes */ - u16 iCacheL1LogLineSize; /* Log-2 of ICache line size */ - u16 iCacheL1LinesPerPage; /* ICache lines per page */ - u16 slb_size; /* SLB size in entries */ - u64 physicalMemorySize; /* Size of real memory in bytes */ - u64 pftSize; /* Log base 2 of page table size */ - u64 serialPortAddr; /* Phyical address of serial port */ - u8 interrupt_controller; /* Type of interrupt controller */ - u8 resv0; /* Type of interrupt controller */ - u16 platform; /* Platform flags */ - u8 resv1[12]; /* Padding */ + /*================================================================== + * Cache line 1: 0x0000 - 0x007F + * Kernel only data - undefined for user space + *================================================================== + */ + void *xItVpdAreas; /* VPD Data 0x00 */ + void *xRamDisk; /* iSeries ramdisk 0x08 */ + u64 xRamDiskSize; /* In pages 0x10 */ + struct paca_struct *paca; /* Ptr to an array of pacas 0x18 */ + u64 debug_switch; /* Debug print control 0x20 */ + u64 banner; /* Ptr to banner string 0x28 */ + u64 log; /* Ptr to log buffer 0x30 */ + u64 serialPortAddr; /* Phy addr of serial port 0x38 */ + u64 interrupt_controller; /* Type of int controller 0x40 */ + u64 slb_size; /* SLB size in entries 0x48 */ + u64 pftSize; /* Log 2 of page table size 0x50 */ + void *systemcfg; /* Pointer to systemcfg data 0x58 */ + u32 dCacheL1LogLineSize; /* L1 d-cache line size Log2 0x60 */ + u32 dCacheL1LinesPerPage; /* L1 d-cache lines / page 0x64 */ + u32 iCacheL1LogLineSize; /* L1 i-cache line size Log2 0x68 */ + u32 iCacheL1LinesPerPage; /* L1 i-cache lines / page 0x6c */ + u64 resv0[2]; /* Reserved 0x70 - 0x7F */ }; extern struct naca_struct *naca; + +#endif /* __ASSEMBLY__ */ + +#define NACA_PAGE 0x4 +#define NACA_PHYS_ADDR (NACA_PAGE<> SID_SHIFT) & SID_MASK) +/* align addr on a size boundary - adjust address up/down if needed */ +#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) +#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) + +/* align addr on a size boundary - adjust address up if needed */ +#define _ALIGN(addr,size) _ALIGN_UP(addr,size) + +/* to align the pointer to the (next) double word boundary */ +#define DOUBLEWORD_ALIGN(addr) _ALIGN(addr,sizeof(unsigned long)) + +/* to align the pointer to the (next) page boundary */ +#define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) + #ifdef __KERNEL__ #ifndef __ASSEMBLY__ #include @@ -37,7 +54,7 @@ { unsigned long lines, line_size; - line_size = naca->dCacheL1LineSize; + line_size = systemcfg->dCacheL1LineSize; lines = naca->dCacheL1LinesPerPage; __asm__ __volatile__( @@ -113,19 +130,6 @@ #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) #endif /* __ASSEMBLY__ */ - -/* align addr on a size boundary - adjust address up/down if needed */ -#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) -#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) - -/* align addr on a size boundary - adjust address up if needed */ -#define _ALIGN(addr,size) _ALIGN_UP(addr,size) - -/* to align the pointer to the (next) double word boundary */ -#define DOUBLEWORD_ALIGN(addr) _ALIGN(addr,sizeof(unsigned long)) - -/* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) #ifdef MODULE #define __page_aligned __attribute__((__aligned__(PAGE_SIZE))) diff -Nru a/include/asm-ppc64/proc_fs.h b/include/asm-ppc64/proc_fs.h --- a/include/asm-ppc64/proc_fs.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/proc_fs.h Fri Jun 27 22:14:17 2003 @@ -25,9 +25,14 @@ #include -void pmc_proc_init(struct proc_dir_entry *iSeries_proc); -void proc_ppc64_init(void); +struct proc_ppc64_t { + struct proc_dir_entry *root; + struct proc_dir_entry *naca; + struct proc_dir_entry *paca; + struct proc_dir_entry *systemcfg; + struct proc_dir_entry *rtas; +}; -#include +extern struct proc_ppc64_t proc_ppc64; -#endif +#endif /* _PPC64_PROC_FS_H */ diff -Nru a/include/asm-ppc64/ptrace.h b/include/asm-ppc64/ptrace.h --- a/include/asm-ppc64/ptrace.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/ptrace.h Fri Jun 27 22:14:17 2003 @@ -64,9 +64,8 @@ #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ -/* Size of stack frame allocated when calling signal handler. */ -/* FIXME: What should this be on 64-bit kernel (64 for 32-bit) */ -#define __SIGNAL_FRAMESIZE 64 +/* Size of dummy stack frame allocated when calling signal handler. */ +#define __SIGNAL_FRAMESIZE 128 #define __SIGNAL_FRAMESIZE32 64 #define instruction_pointer(regs) ((regs)->nip) diff -Nru a/include/asm-ppc64/rtas.h b/include/asm-ppc64/rtas.h --- a/include/asm-ppc64/rtas.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/rtas.h Fri Jun 27 22:14:17 2003 @@ -166,8 +166,6 @@ extern void rtas_power_off(void); extern void rtas_halt(void); -extern struct proc_dir_entry *rtas_proc_dir; - /* Some RTAS ops require a data buffer and that buffer must be < 4G. * Rather than having a memory allocator, just use this buffer * (get the lock first), make the RTAS call. Copy the data instead diff -Nru a/include/asm-ppc64/sigcontext.h b/include/asm-ppc64/sigcontext.h --- a/include/asm-ppc64/sigcontext.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/sigcontext.h Fri Jun 27 22:14:17 2003 @@ -9,6 +9,8 @@ */ #include +#include + struct sigcontext { unsigned long _unused[4]; @@ -16,7 +18,9 @@ int _pad0; unsigned long handler; unsigned long oldmask; - struct pt_regs *regs; + struct pt_regs *regs; + elf_gregset_t gp_regs; + elf_fpregset_t fp_regs; }; #endif /* _ASM_PPC64_SIGCONTEXT_H */ diff -Nru a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h --- a/include/asm-ppc64/types.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/types.h Fri Jun 27 22:14:17 2003 @@ -66,6 +66,11 @@ typedef u32 dma_addr_t; typedef u64 dma64_addr_t; +typedef struct { + unsigned long entry; + unsigned long toc; + unsigned long env; +} func_descr_t; #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc64/ucontext.h b/include/asm-ppc64/ucontext.h --- a/include/asm-ppc64/ucontext.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/ucontext.h Fri Jun 27 22:14:17 2003 @@ -1,8 +1,9 @@ #ifndef _ASMPPC64_UCONTEXT_H #define _ASMPPC64_UCONTEXT_H -/* Copied from i386. - * +#include + +/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -13,8 +14,9 @@ unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; /* mask last for extensibility */ + sigset_t uc_sigmask; + sigset_t __unsued[15]; /* Allow for uc_sigmask growth */ + struct sigcontext uc_mcontext; /* last for extensibility */ }; #endif /* _ASMPPC64_UCONTEXT_H */ diff -Nru a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h --- a/include/asm-ppc64/unistd.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/unistd.h Fri Jun 27 22:14:17 2003 @@ -260,7 +260,7 @@ #define __NR_clock_getres 247 #define __NR_clock_nanosleep 248 -#define __NR_syscalls 249 +#define __NR_syscalls 239 #ifdef __KERNEL__ #define NR_syscalls __NR_syscalls #endif diff -Nru a/include/asm-ppc64/xics.h b/include/asm-ppc64/xics.h --- a/include/asm-ppc64/xics.h Fri Jun 27 22:14:17 2003 +++ b/include/asm-ppc64/xics.h Fri Jun 27 22:14:17 2003 @@ -12,7 +12,17 @@ #ifndef _PPC64_KERNEL_XICS_H #define _PPC64_KERNEL_XICS_H +#include + void xics_init_IRQ(void); int xics_get_irq(struct pt_regs *); +void xics_setup_cpu(void); +void xics_cause_IPI(int cpu); + +struct xics_ipi_struct { + volatile unsigned long value; +} ____cacheline_aligned; + +extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; #endif /* _PPC64_KERNEL_XICS_H */